﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 边长参数
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(Average(1));
            Console.WriteLine(Average(1, 2, 3, 4));
        }
        static double Average(params int[]a)
        {
            int b = a.GetLength(0);//取第一维长度
            double s = 0;
            foreach (int k in a)
                s += k;
            return s / b;
        }
    }
}
